
/**
 * @Project : Clion_ProgrammingExercises
 * @File : 1
 * @Author : WangRuoyu 
 * @Date : 2023/5/19 9:16
 */

#include "iostream"

using namespace std;

int main() {
    int n;
    double k;
    scanf("%d %lf", &n, &k);

    double res = 0;
    double kk = 1;
    for (int i = 0; i <= n; ++i) {
        int a;
        scanf("%d", &a);
        res += a * 1.0 / kk;
        kk *= 1.0 + k;
    }

    printf("%.4f", res);

    return 0;
}